home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
programming
/
other
/
gui4cli
/
dir
/
dir.g2
< prev
next >
Wrap
Text File
|
1999-05-14
|
2KB
|
124 lines
G4C
; helper gui for dealing with files
; THE POP-UP ON DOUBLE-CLICK GUIs
WinBig 0 0 80 90 ""
WinType 00001000
winonmouse 30 7
varpath dir.gc/cli.gc ; the guis whose vars we need
xOnRMB
guiclose Dir.g2
xOnInactive
guiclose Dir.g2
xOnFail
ezreq "Error during operation" OK ""
;---------------> the Buttons
xbutton 0 0 0 15 Auto
guiclose dir.g2
; using the new routines
guiload guis:tools/rtn/GetFileType $dir.gc/lv_file
filetype = $$ret.0
if $filetype > ''
guiload guis:tools/rtn/ViewFile $dir.gc/lv_file $dir.g2/filetype RUN
endif
xbutton 0 15 0 15 More..
guiopen dir.pop2
guiclose dir.g2
xbutton 0 30 0 15 List
*FILENAME = $lv_file
guiload guis:tools/read.gc
guiopen read.gc
xbutton 0 45 0 15 Cli.. ; call the cli.gc gui with FileName & Mode
cd $$lv.dir
guiclose dir.g2
guiload guis:tools/cli.gc $dir.gc/lv_file RUN
xbutton 0 60 0 15 'Edit'
ifexists port rexx_ced ; if the CygnusEd editor is running..
ifexists gui cedbar.gc ; use it for the editing
guiscreen cedbar.gc front
else
guiscreen dir.g2 back ; hoping that Ced is the next screen..
endif
sendrexx rexx_ced 'open new'
sendrexx rexx_ced 'open $lv_file'
sendrexx rexx_ced 'expand view'
else
run '$*DEF.EDITOR $lv_file'
endif
guiclose dir.g2
xbutton 0 75 0 15 Rx
guiclose dir.g2
extract lv_file path path
cd '$path'
cli 'rx $lv_file'
;#########################################################################
NEWFILE dir.pop2 ; Pop-up on double-click "More.." gui.
WinBig 0 0 80 90 ""
WinType 00001000
winonmouse 30 7
varpath dir.gc/cli.gc/dir.search ; the guis whose vars we need
xOnRMB
guiclose Dir.pop2
xOnInactive
guiclose Dir.pop2
xOnFail
ezreq "Error during operation" OK ""
;---------------> the Buttons
xbutton 0 0 0 15 'MView'
guiclose dir.pop2
run '$*DEF.DT $lv_file'
xbutton 0 15 0 15 'FRead'
guiclose dir.pop2
*FRGUIDE = $lv_file
guiload guis:tools/fastread/fastread.gc
xbutton 0 30 0 15 'DPaint'
ifexists port DPAINT.1
.trx = '/* */\nADDRESS "DPAINT.1"\nLOADANIM '
appvar .trx "\'FILE=$lv_file\'"
sendrexx REXX env:.trx
guiscreen dir.pop2 back
elseifexists file c:wbrun
run 'c:wbrun $*DEF.PAINT $lv_file'
else
run '$*DEF.PAINT $lv_file'
endif
guiclose dir.pop2
xbutton 0 45 0 15 'GfxEd'
run '$*DEF.GFXED $lv_file'
xbutton 0 60 0 15 'HexView'
run '$*DEF.HEX $lv_file'
xbutton 0 75 0 15 'Mod'
run '$*DEF.MOD $dir.gc/lv_file'